﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace WpfApp2
{
    // 参数基类
    public abstract class ParameterBase : INotifyPropertyChanged
    {
        public string TypeName { get; set; }
        public event PropertyChangedEventHandler PropertyChanged;
        protected void OnPropertyChanged([CallerMemberName] string name = null) =>
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
    }

    // 具体参数类型（示例）
    public class TextParameter : ParameterBase
    {
        private string _name;
        public string Name
        {
            get => _name;
            set { _name = value; OnPropertyChanged(); }
        }
        private int _age;
        public int Age
        {
            get => _age;
            set { _age = value; OnPropertyChanged(); }
        }
    }

    public class NumberParameter : ParameterBase
    {
        private int _numberValue;
        public int NumberValue
        {
            get => _numberValue;
            set { _numberValue = value; OnPropertyChanged(); }
        }
      
    }
}
